package main

import (
	"log"
	"sync"
	"time"
)

var (
	once sync.Once
	s    *Single
)

type Single struct {
}

func Instance() *Single {
	log.Print(1)
	once.Do(func() {
		log.Print("once")
		s = &Single{}
	})
	return s
}

func main() {
	for i := 0; i < 10; i++ {
		go Instance()
	}
	time.Sleep(time.Millisecond)
}
